home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / PowerPlant / Gadgets / DDocData.h < prev    next >
Encoding:
Text File  |  1998-10-11  |  4.1 KB  |  171 lines  |  [TEXT/CWIE]

  1. // DDocData -- data class for Gadgets
  2.  
  3. #pragma once
  4.  
  5. #include "AMDataDef.h"
  6.  
  7. class LFileStream;
  8.  
  9.  
  10. const long    idTriangle        = 'Trie';
  11. const long    idLeftRight        = 'Left';
  12. const long    idRadios        = 'Rads';
  13. const long    idBars        = 'Bars';
  14. const long    idStandard2        = 'Sta2';
  15. const long    idGraphic        = 'Grac';
  16. const long    idSlider        = 'Slir';
  17. const long    idTickMarks        = 'Tics';
  18. const long    idNonDirectional        = 'Nonl';
  19. const long    idLittleArrows        = 'Lits';
  20. const long    idSpinner        = 'Spir';
  21. const long    idVolumeControl        = 'Voll';
  22. const long    idJimSSlider        = 'Jimr';
  23. const long    idStandard3        = 'Sta3';
  24. const long    idIndeterminate        = 'Inde';
  25. const long    idChasingArrows        = 'Chas';
  26. const long    idRectangle        = 'Rece';
  27. const long    idRoundRect        = 'Rout';
  28. const long    idBarberPole        = 'Bare';
  29. const long    idRoundBarber        = 'Rour';
  30. const long    idSmall        = 'Smal';
  31. const long    idLarge        = 'Lare';
  32. const long    idX12345        = 'X145';
  33. const long    idX12345e6        = 'X126';
  34. const long    idPassword        = 'Pasd';
  35. const long    idDate        = 'Date';
  36. const long    idTime        = 'Time';
  37. const long    idStyled        = 'Styd';
  38.  
  39.  
  40. //----------
  41. class DDocData : public AMDataDef {
  42. public:
  43.                 DDocData ();
  44.     virtual        ~DDocData ();
  45.  
  46. public:
  47.     void        CopyFrom        (DDocData*        inOther);
  48.     void        ReadFromFile    (LFileStream*        inFile);
  49.     void        WriteToFile        (LFileStream*        inFile);
  50.  
  51. public:        // accessors
  52.     Boolean        GetTriangle () const;
  53.     void        SetTriangle    (Boolean        inValue);
  54.  
  55.     Boolean        GetLeftRight () const;
  56.     void        SetLeftRight    (Boolean        inValue);
  57.  
  58.     SInt16        GetRadios () const;
  59.     void        SetRadios    (SInt16        inValue);
  60.  
  61.     UInt16        GetBars () const;
  62.     void        SetBars    (UInt16        inValue);
  63.  
  64.     SInt16        GetStandard2 () const;
  65.     void        SetStandard2    (SInt16        inValue);
  66.  
  67.     SInt16        GetGraphic () const;
  68.     void        SetGraphic    (SInt16        inValue);
  69.  
  70.     SInt16        GetSlider () const;
  71.     void        SetSlider    (SInt16        inValue);
  72.  
  73.     SInt16        GetTickMarks () const;
  74.     void        SetTickMarks    (SInt16        inValue);
  75.  
  76.     SInt16        GetNonDirectional () const;
  77.     void        SetNonDirectional    (SInt16        inValue);
  78.  
  79.     SInt16        GetLittleArrows () const;
  80.     void        SetLittleArrows    (SInt16        inValue);
  81.  
  82.     SInt16        GetSpinner () const;
  83.     void        SetSpinner    (SInt16        inValue);
  84.  
  85.     SInt16        GetVolumeControl () const;
  86.     void        SetVolumeControl    (SInt16        inValue);
  87.  
  88.     SInt16        GetJimSSlider () const;
  89.     void        SetJimSSlider    (SInt16        inValue);
  90.  
  91.     SInt16        GetStandard3 () const;
  92.     void        SetStandard3    (SInt16        inValue);
  93.  
  94.     SInt16        GetIndeterminate () const;
  95.     void        SetIndeterminate    (SInt16        inValue);
  96.  
  97.     SInt16        GetChasingArrows () const;
  98.     void        SetChasingArrows    (SInt16        inValue);
  99.  
  100.     SInt16        GetRectangle () const;
  101.     void        SetRectangle    (SInt16        inValue);
  102.  
  103.     SInt16        GetRoundRect () const;
  104.     void        SetRoundRect    (SInt16        inValue);
  105.  
  106.     SInt16        GetBarberPole () const;
  107.     void        SetBarberPole    (SInt16        inValue);
  108.  
  109.     SInt16        GetRoundBarber () const;
  110.     void        SetRoundBarber    (SInt16        inValue);
  111.  
  112.     StringPtr    GetSmall    (Str255        outStr = nil) const;
  113.     void        SetSmall    (ConstStringPtr    inValue);
  114.     void        SetSmall    (CharsHandle    inValue);
  115.  
  116.     StringPtr    GetLarge    (Str255        outStr = nil) const;
  117.     void        SetLarge    (ConstStringPtr    inValue);
  118.     void        SetLarge    (CharsHandle    inValue);
  119.  
  120.     SInt32        GetX12345 () const;
  121.     void        SetX12345    (SInt32        inValue);
  122.  
  123.     double        GetX12345e6 () const;
  124.     void        SetX12345e6    (double        inValue);
  125.  
  126.     StringPtr    GetPassword    (Str255        outStr = nil) const;
  127.     void        SetPassword    (ConstStringPtr    inValue);
  128.     void        SetPassword    (CharsHandle    inValue);
  129.  
  130.     LongDateRec        GetDate () const;
  131.     void        SetDate    (LongDateRec        inValue);
  132.  
  133.     LongDateRec        GetTime () const;
  134.     void        SetTime    (LongDateRec        inValue);
  135.  
  136.     StringPtr    GetStyled    (Str255        outStr = nil) const;
  137.     void        SetStyled    (ConstStringPtr    inValue);
  138.     void        SetStyled    (CharsHandle    inValue);
  139.  
  140.  
  141. protected:
  142.     Boolean        mTriangle;
  143.     Boolean        mLeftRight;
  144.     SInt16        mRadios;
  145.     UInt16        mBars;
  146.     SInt16        mStandard2;
  147.     SInt16        mGraphic;
  148.     SInt16        mSlider;
  149.     SInt16        mTickMarks;
  150.     SInt16        mNonDirectional;
  151.     SInt16        mLittleArrows;
  152.     SInt16        mSpinner;
  153.     SInt16        mVolumeControl;
  154.     SInt16        mJimSSlider;
  155.     SInt16        mStandard3;
  156.     SInt16        mIndeterminate;
  157.     SInt16        mChasingArrows;
  158.     SInt16        mRectangle;
  159.     SInt16        mRoundRect;
  160.     SInt16        mBarberPole;
  161.     SInt16        mRoundBarber;
  162.     Str255        mSmall;
  163.     Str255        mLarge;
  164.     SInt32        mX12345;
  165.     double        mX12345e6;
  166.     Str255        mPassword;
  167.     LongDateRec        mDate;
  168.     LongDateRec        mTime;
  169.     Str255        mStyled;
  170. };
  171.